<template>
	<view class="toView">
		<view class="header">
			<image src="../../../static/img/monitor/information/information1@2x.png"></image>
			<view class="information">
				<view class="top">
					<view>会员：{{userInforDetail.realName || ''}}</view>
					<view>年龄：{{userInforDetail.age+'岁' || ''}}</view>
					<view>性别：{{userInforDetail.sex == 1 ? '男' : userInforDetail.sex == 2 ? '女' : '未知'}}</view>
				</view>
				<view class="bottom">
					<view v-if="userInforDetail.sources == 3">签发人：{{userInforDetail.healthName || ''}}</view>
					<view v-else>记录人：{{userInforDetail.realName || ''}}</view>
					<view v-if="userInforDetail.sources == 3">签发日期：{{userInforDetail.updateTime || ''}}</view>
					<view v-else>记录日期：{{userInforDetail.updateTime || ''}}</view>
				</view>
			</view>
		</view>
		<view class="two"></view>
		<view class="three"></view>
		
		<view class="mainContent">
			<!-- 基本信息 -->
			<view class="informationBox">
				<view class="boxOne">
					<image src="../../../static/img/monitor/information/information2@2x.png"></image>
				</view>
				<view class="boxTwo">
					<view class="item">
						<text>身份证号</text>
						<view>{{userInforDetail.idCard  || '未填写'}}</view>
					</view>
					<view class="item">
						<text>姓名</text>
						<view>{{userInforDetail.realName  || '未填写'}}</view>
					</view>
					<view class="item">
						<text>性别</text>
						<view>{{userInforDetail.sex == 1 ? '男' : userInforDetail.sex == 2 ? '女' : '未知'}}</view>
					</view>
					<view class="item">
						<text>出生日期</text>
						<view>{{userInforDetail.birthday || '未填写'}}</view>
					</view>
					<view class="item">
						<text>年龄</text>
						<view>{{userInforDetail.age  || '未填写'}}</view>
					</view>
					<view class="item">
						<text>手机号</text>
						<view>{{userInforDetail.phone  || '未填写'}}</view>
					</view>
				</view>
			</view>
			
			<!-- 其他信息 -->
			<view class="informationBox">
				<view class="boxOne">
					<image src="../../../static/img/monitor/information/information3@2x.png" style="width: 180px;height: 16px;"></image>
				</view>
				<view class="boxTwo">
					<view class="item">
						<text>民族</text>
						<view>{{userInforDetail.nation || '未填写'}}</view>
					</view>
					<view class="item">
						<text>工作单位</text>
						<view>{{userInforDetail.employer || '未填写'}}</view>
					</view>
					<view class="item">
						<text>紧急联系人</text>
						<view>{{userInforDetail.emergencyContactName || '未填写'}}</view>
					</view>
					<view class="item">
						<text>紧急联系人电话</text>
						<view>{{userInforDetail.emergencyContactPhone || '未填写'}}</view>
					</view>
					<view class="item">
						<text>血型</text>
						<view>{{userInforDetail.bloodGroup || '未填写'}}</view>
					</view>
					<view class="item">
						<text>文化程度</text>
						<view>{{userInforDetail.educationLevel || '未填写'}}</view>
					</view>
					<view class="item">
						<text>职业</text>
						<view>{{userInforDetail.occupation || '未填写'}}</view>
					</view>
					<view class="item">
						<text>婚姻状况</text>
						<view>{{userInforDetail.maritalStatus || '未填写'}}</view>
					</view>
					<view class="item">
						<text>医疗费用支付</text>
						<view>{{userInforDetail.medicalExpensesType || '未填写'}}</view>
					</view>
				</view>
			</view>
			
			<!-- 健康信息 -->
			<view class="informationBox">
				<view class="boxOne">
					<image src="../../../static/img/monitor/information/information4@2x.png" style="width: 180px;height: 16px;"></image>
				</view>
				<view class="boxTwo">
					<view class="item">
						<text>药物过敏史</text>
						<view v-if="userInforDetail.drugAllergy">
							<text  v-for="(item,index) in userInforDetail.drugAllergy":key="index">{{item}}</text>
						</view>
						<view v-else>
							<text>无</text>
						</view>
					</view>
					<view class="item">
						<text>暴露史</text>
						<view v-if="userInforDetail.exposureHistory">
							<text  v-for="(item,index) in userInforDetail.exposureHistory":key="index">{{item}}</text>
							<!-- <view>{{userInforDetail.exposureHistory || '无'}}</view> -->
						</view>
						<view v-else>
							<text>无</text>
						</view>
					</view>
					<view>
						<view class="item" v-for="(item,index) in userInforDetail.pastHistory && JSON.parse(userInforDetail.pastHistory)" :key="'a'+index" style="display: unset;">
							<text style="font-weight: bold;	">{{item.name}}</text>
							<div>
								<view v-for="(a,ai) in item.parameterValueRes && item.parameterValueRes" :key="ai" style="display: flex;">
									<view style="text-indent: 1em;">{{a.name}}</view>
									<view>{{a.value}}</view>
								</view>
							</div>
						</view>
					</view>
				</view>
			</view>
			
			<!-- 家族史 -->
			<view class="informationBox">
				<view class="boxOne">
					<image src="../../../static/img/monitor/information/information5@2x.png" style="width: 180px;height: 18px;"></image>
				</view>
				<view class="boxTwo">
					<view class="item" v-for="(item,aindex) in userInforDetail.familyHistory && JSON.parse(userInforDetail.familyHistory)" :key="aindex">
						<text>{{item.name}}</text>
						<view>
							<text>{{(item.parameterValueRes && item.parameterValueRes.map((a)=>{return a.value}).join(',') || '无')}}</text>
						</view>
					</view>
					<!-- <view class="item">
						<text>父亲</text>
						<view>
							<text  v-for="(item,index) in userInforDetail.fatherArr":key="index">{{item}}</text>
						</view>
					</view>
					<view class="item">
						<text>母亲</text>
						<view>
							<text  v-for="(item,index) in userInforDetail.montherArr":key="index">{{item}}</text>
						</view>
					</view>
					<view class="item">
						<text>兄弟姐妹</text>
						<view>
							<text  v-for="(item,index) in userInforDetail.sisterArr":key="index">{{item ? item : '无'}}</text>
						</view>
					</view>
					<view class="item">
						<text>子女</text>
						<view>
							<text  v-for="(item,index) in userInforDetail.sonArr":key="index">{{item ? item : '无'}}</text>
						</view>
					</view> -->
					<view class="item">
						<text>遗传病史</text>
						<view>
							<text>{{userInforDetail.geneticDisease || '无'}}</text>
						</view>
						<!-- <view  v-if="userInforDetail.geneticDisease && userInforDetail.geneticDisease.length > 0">
							<text v-for="(item,index) in userInforDetail.geneticDisease":key="index">{{item ? item : '无'}}</text>
						</view>
						<view v-else>无</view> -->
					</view>
					<view class="item">
						<text>残疾情况</text>
						<view v-if="userInforDetail.disability">
							<text v-for="(item,index) in userInforDetail.disability":key="index">{{item.substr(0,item.length - 1)}}</text>
						</view>
						<view v-else>
							<text>无</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
	<!-- <view class="item">
		<text>文化程度</text>
		<view>
			<view>1</view>
			<view>2</view>
		</view>
	</view> -->
</template>

<script src="@/static/js/monitor/information/toView.js">
</script>

<style lang="scss" scoped>
	@import "@/static/css/monitor/information/toView.scss";
</style>
